import { createRouter, createWebHistory } from "vue-router";
import { getMicroApp } from "vite-plugin-legacy-qiankun";
import pkg from "../../package.json"; // your micro app name (pkg.name)
const microApp = getMicroApp(pkg.name);

export default createRouter({
  history: createWebHistory(microApp.__POWERED_BY_QIANKUN__ ? "/vue3" : "/"),
  routes: [
    {
      path: "/outbound",
      component: () => import("../views/outbound/index.vue"),
      name: "Outbound",
    },
    {
      path: "/warehousing",
      component: () => import("../views/warehousing/index.vue"),
      name: "Warehousing",
    },
  ],
});
